

<div class="layui-form-item">
	<label class="layui-form-label">商品分类</label>
	<div class="layui-input-block">
		<input type="text" name="title" autocomplete="off" placeholder="请输入标题" class="layui-input" value="<#list parentList as parent><#if parent_index != 0>&nbsp;&gt;&nbsp;</#if>${parent.name}</#list>" class="layui-input w300" value="${goods.cat_id}" disabled="disabled" >
		<input type="hidden" name="type_id" id="typeid" value="${typeid!''}" />
		<input type="hidden" id="old_typeid" value="${typeid!''}" />
	</div>
</div>

<div class="layui-form-item">
	<label class="layui-form-label">商品名称</label>
	<div class="layui-input-block">
		<input type="text" name="name" lay-verify="required" autocomplete="off" placeholder="请输入商品名称" class="layui-input w300" value="${goodsView.name}"  >
	</div>
</div>

<div class="layui-form-item">
	<label class="layui-form-label">商品编号</label>
	<div class="layui-input-block">
		<input type="text" name="sn" lay-verify="required" autocomplete="off" placeholder="请输入商品编号" class="layui-input w300" value="${goodsView.sn}" >
	</div>j
</div>

<div class="layui-form-item">
	<label class="layui-form-label">是否上架</label>
	<div class="layui-input-block">
		<input type="radio" name="market_enable" value="1" title="是" <#if goods.market_enable==1>checked="checked"</#if> >
		<input type="radio" name="market_enable" value="0" title="否" <#if goods.market_enable==0>checked="checked"</#if>>
	</div>
</div>

<div class="layui-form-item">
	<label class="layui-form-label">市场价格</label>
	<div class="layui-input-block">
		<input type="text" name="mktprice" lay-verify="money" autocomplete="off" maxlength="9" placeholder="请输入市场价格" class="layui-input w300" value="${goodsView.mktprice}" >
		<input type="hidden" name="point" value="0" />
	</div>
</div>

<div class="layui-form-item">
	<label class="layui-form-label">详情描述</label>
	<div class="layui-input-block">
		<script id="editor" name="intro" type="text/plain" style="height: 200px; width: 99%;">${goods.intro!''?html}</script>
	</div>
</div>


<script>
	var ue = UE.getEditor('editor',{
		zIndex:0,
	});
	
	/**
	* 新加载属性和参数输入页
	*/
	function loadParamsPage(catid,typeid){
		/**
		* 商品最原始的类型
		*/
		var oldtypeid= $("#old_typeid").val();
		
		//如果和商品原模型不一样 加载新模型的输入页
		if(typeid!=oldtypeid){
			$(".tab-panel[tabid=9]").load("${ctx}/shop/admin/goods-params/get-add-page-html.do?catid="+catid);
			$(".tab-panel[tabid=7]").load("${ctx}/shop/admin/goods-props/get-add-page-html.do?catid="+catid);
			$(".tab-panel[tabid=4]").load("${ctx}/shop/admin/goods-specs/get-add-page-html.do?catid="+catid);
		}else{ //和商品同模型，则显示此商品的 参数和属性页
			$(".tab-panel[tabid=9]").load("${ctx}/shop/admin/goods-params/get-edit-page-html.do?goodsid=${goods.goods_id}&type_id="+typeid);
			$(".tab-panel[tabid=7]").load("${ctx}/shop/admin/goods-props/get-edit-page-html.do?goodsid=${goods.goods_id}&type_id="+typeid);
			$(".tab-panel[tabid=4]").load("${ctx}/shop/admin/goods-specs/get-edit-page-html.do?goodsid=${goods.goods_id}&type_id="+typeid);

		}
		
	}
	
</script>

